Tips & techniques for Users of Sunsoft Solaris

August 1995

Taking a look at Solaris volume management

Do you frequently use your floppy and CD-ROM drives on your Solaris system? If so, you know that prior to Solaris version 2.2, you could only manually mount floppies and CD-ROMs when logged in as the superuser root. With current versions of Solaris (2.2 and higher), you can configure floppies and CD-ROMs for automatic mounting with the Solaris volume management system.

In this article, we'll discuss how the Solaris volume management system works. We'll also take a look at the configuration files for vold and rmmount and how to change them for your system needs.

Volume management files

By default, Solaris loads the volume management daemon /usr/sbin/vold each time your system boots. The volume management daemon uses the configuration file /etc/vold.conf to determine which devices to manage. The vold.conf file, shown in Figure A, also configures actions and default labels for floppies and CD-ROMs.

In addition to vold and vold.conf, volume management uses the removable media mounter /usr/sbin/rmmount. Like vold, rmmount also has a configuration file that sets the removable media mounts. This file, rmmount.conf, is also found in the /etc directory. In Figure B, you can see the default values for rmmount.conf. Inside this file, you can configure removable media for sharing across your network. Let's take a look at what the configuration files do. First we'll examine the volume management daemon configuration file vold.conf.

Looking at vold.conf

In Solaris 2.4, the vold.conf file sets the configuration for the volume management daemon vold. In Figure A, you can see the volume management actions separated into field types by remarked headings. The only fields in this file that an administrator should ever change are found under the Devices To Use and Actions fields.

In the Devices To Use field, you must use the following syntax for each line:

use device type special shared_object symname [options]

If, for example, you were to add a CD-ROM drive to your system that didn't match the special field in the vold.conf file, you'd have to enter a line under the Devices To Use heading. Be sure that the new line has the exact device path of the new drive in the special field as well as the appropriate symbolic name (symname) you want to represent the path. For example, the line

use cdrom drive /dev/rdsk/01/cdrom8 dev_cdrom.so cdrom%d

creates a volume management device loaded on the /dev/rdsk/01/cdrom8 device path with the symbolic path name
/cdrom&d. This allows Volume Manager to assign a newly mounted CD on this device to the next symbolic name.

The Actions field uses shell commands as well as other volume management programs. These include the volume management utilities listed in Table A. By default, the Actions field contains the rmmount insert and eject actions for the default floppy and CD-ROM drives listed in the Devices To Use field. The last line in this group of fields

notify /vol*/rdsk/* group=tty user=root /usr/lib/vold/volmissing -p

sends a message to the file /var/adm/vold.log. This log file tracks error messages from the volume management daemon vold. Now let's look at the removable media mounter rmmount.

TABLE A

Volume management utilities

volcheck Checks for media in floppy drive by default

volmissing Informs a user when a requested volume is no longer in the drive

volcancel Cancels a user's request to access a particular floppy or CD-ROM file system

eject Ejects media from devices managed by volume management.

The removable media mounter

Rmmount mounts a floppy or CD-ROM when the disk is inserted in the drive while the volume management daemon runs. Then rmmount determines which type of file system is on the removable media. If it finds a file system, rmmount mounts the file system on one of the locations shown in Table B.

TABLE B

Mount location/State of media

/floppy/floppy0 Symbolic link to mounted floppy in local floppy drive

/floppy/floppy_name Mounted named floppy

/floppy/unnamed_floppy Mounted unnamed floppy

/cdrom/cdrom0 Symbolic link to local CD-ROM mounted in local CD-ROM drive

/cdrom/CD-ROM_name Mounted CD-ROM name

/cdrom/CD-ROM_name/partition Mounted CD-ROM name with partitioned file system

/cdrom/unnamed_cdrom Mounted unnamed CD-ROM

The configuration file for rmmount, rmmount.conf, describes where to find shared objects that perform actions on file systems after identifying and mounting them. This configuration file can also set up removable file systems for sharing across the network. In the default rmmount.conf, shown in Figure B, you see that no shares are configured. In most cases, you'll never have to add lines to the File system identification field. The three main types of file systems you'll encounter on removable media are already configured for you. If a file system isn't identified, then rmmount won't mount a file system. The file systems configured,

hsfs high sierra file system

ufs UNIX file system

pcfs DOS formatted file system

should not be changed. Next, let's take a look at the Actions field.

Actions in the rmmount.conf file occur in the order of their appearance in the file. When you insert a CD-ROM or floppy disk, rmmount runs and determines the file system type and proceeds to the Actions field. Each action will return a 0 or 1 to rmmount. If rmmount receives a 0 from an action, no further actions will take place. This feature lets you configure a sequence for certain actions. For example, the action field

action cdrom action_filemgr.so

always returns a 0 to rmmount when File Manager runs in an OpenWindows session. Any action configured after this line in the rmmount.conf file will never run if you insert a CD-ROM disc with File Manager running.

Below the Actions field, you can configure removable media shares. If, for example, you need to set up a server's CD-ROM as a shared Network File System (NFS), you can add

share cdrom0

below the last Actions field. You can also configure your server to share any CD-ROM or floppy inserted into a Solaris system via NFS, as shown in Figure C 12 by using a wildcard for the device.

Conclusion

Using the command line to mount floppies and CD-ROMs can be a hassle. If you have Solaris 2.2 or higher and are aware of the volume management system, you might be able to save yourself some time by configuring your removable media devices for automatic mounting. You can also configure automatic mounts for sharing via NFS with Volume Manager. In this article, we've discussed the Solaris Volume Manager. We've also shown how to make changes to Volume Manager configuration files.


[Return to Index for Inside Solaris - August Issue]

Copyright (c) 1995 The Cobb Group, a division of Ziff-Davis Publishing Company. All rights reserved.

Reproduction in whole or in part in any form or medium without express written permission of Ziff-Davis

Publishing Company is prohibited. The Cobb Group and The Cobb Group logo are trademarks of

Ziff-Davis Publishing Company.

Inside Solaris is a publication of The Cobb Group.
1-800-223-8720